﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MailboxRightsLookup
{
    class MailboxPermissionDetails
    {
        MailboxDetails _details;
        MailboxPermission _permission;

        public bool fullAccess { get { return _permission.fullAccess; } }
        public bool sendAs { get { return _permission.sendAs; } }
        public bool direct { get; set; }
        public string throughGroup { get; set; }
        public string displayName { get { return _details.displayName; } }
        public string sAMAccountName { get { return _details.sAMAccountName; } }
        public string primarySmtp { get { return _details.primarySmtp; } }
        public string database { get { return _details.database; } }
        public string distinguishedName { get { return _details.distinguishedName; } }

        public MailboxPermissionDetails(MailboxPermission permission)
        {
            _permission = permission;
            _details = new MailboxDetails(_permission.mailboxGuid, _permission.path);
        }
    }
}
